package io.renren.modules.ProjectControl.ProcessSchedule.Service.plm.iml;

import io.renren.modules.ProjectControl.ProcessSchedule.Service.plm.PlmMachineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import java.util.Map;
@Service
@RefreshScope
public class PlmMachineServiceImpl implements PlmMachineService {
    @Autowired
    private RestTemplate restTemplate;
    @Value("${project.p3location}")
    String p3KtgLocation;


    @Override
    public String list(Map<String, Object> map) {
        return restTemplate.getForObject(p3KtgLocation+"/plm/machine/list",String.class,map);
    }
}
